package com.weicoder.shop.po

import javax.persistence.Entity
import org.hibernate.annotations.DynamicInsert
import org.hibernate.annotations.DynamicUpdate
import org.springframework.context.annotation.Scope
import org.springframework.stereotype.Component
import org.springframework.beans.factory.config.ConfigurableBeanFactory
import com.weicoder.base.annotation.Cache
import com.weicoder.base.entity.EntityUserId
import com.weicoder.site.entity.base.BaseEntityId
import scala.beans.BeanProperty

/**
 * 收藏夹
 * @author WD
 * @since JDK7
 * @version 1._ 2_12-9-3
 */
@Component
@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
@Entity
@DynamicInsert
@DynamicUpdate
@Cache
class Favorite extends BaseEntityId with EntityUserId {
  // 用户ID
  @BeanProperty
  var userId: Integer = _
  // 商品ID
  @BeanProperty
  var goodsId: Integer = _
}
